# 通用操作

my_list = [1, 2, 3, 4, 5]
my_tuple = (1, 2, 3, 4, 5)
my_str = 'abcdefg'
my_set = {1, 2, 3, 4, 5}
my_dict = {'key1': 'v1', 'key2': 'v2', 'key3': 'v3', 'key4': 'v4', 'key5': 'v5'}

# print("===max===")
# print(max(my_list))
# print(max(my_tuple))
# print(max(my_str))
# print(max(my_set))
# print(max(my_dict))

# print("===min===")
# print(min(my_list))
# print(min(my_tuple))
# print(min(my_str))
# print(min(my_set))
# print(min(my_dict))

# print("===len===")
# print(len(my_list))
# print(len(my_tuple))
# print(len(my_str))
# print(len(my_set))
# print(len(my_dict))

# print("===list===")
# print(list(my_list))
# print(list(my_tuple))
# print(list(my_str))
# print(list(my_set))
# print(list(my_dict))

# print("===tuple===")
# print(tuple(my_list))
# print(tuple(my_tuple))
# print(tuple(my_str))
# print(tuple(my_set))
# print(tuple(my_dict))

print("===str===")
print(str(my_list))
print(str(my_tuple))
print(str(my_str))
print(str(my_set))
print(str(my_dict))

# print("===set===")
# print(set(my_list))
# print(set(my_tuple))
# print(set(my_str))
# print(set(my_set))
# print(set(my_dict))

# 排序
my_list = [3, 2, 1, 4, 5]
print(sorted(my_list))
# 倒序
print(sorted(my_list, reverse=True))

my_str = 'adbcfge'
my_str2 = sorted(my_str)
my_str3 = ''
for i in my_str2:
    my_str3 += i

print(my_str3)
# 倒序
print(sorted(my_str, reverse=True))
